package com.opencloud.ywt.provider.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.opencloud.common.model.PageParams;
import com.opencloud.common.model.ResultBody;
import com.opencloud.ywt.client.model.entity.BhyfClass;
import com.opencloud.ywt.provider.service.BhyfClassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 园务通（班级）
 * @author yeyong
 */
@RestController
@Api(value = "园务通", tags = "园务通")
public class BhyfClassController {
    @Autowired
    private BhyfClassService bhyfClassService;

    /**
     * 获取班级信息
     * @param map
     * @return
     */
    @ApiOperation(value = "获取班级信息", notes = "获取班级信息")
    @GetMapping("/bhyfclass/infos")
    public ResultBody<IPage<BhyfClass>> getClassListPage(
            @RequestParam(required = false) Map map
    )
    {
        return ResultBody.ok().data(bhyfClassService.findListPage(new PageParams(map)));
    }
}
